package com.cskaoyan.model.vo;

import lombok.Data;

/**
 * @program: mall38
 * @description:
 * @author: Wang
 * @create: 2022-05-08 22:30
 **/
@Data
public class CollectorRespVO<T> extends ExceptionVO{

    T data;
    String errmsg;
    int errno;

    public static <T> CollectorRespVO ok(T data) {
        CollectorRespVO CollectorRespVO = new CollectorRespVO();
        CollectorRespVO.setErrno(0);
        CollectorRespVO.setErrmsg("成功");
        CollectorRespVO.setData(data);
        return CollectorRespVO;
    }

    public static CollectorRespVO ok() {
        CollectorRespVO CollectorRespVO = new CollectorRespVO();
        CollectorRespVO.setErrno(0);
        CollectorRespVO.setErrmsg("成功");
        return CollectorRespVO;
    }

    public static CollectorRespVO err() {
        CollectorRespVO CollectorRespVO = new CollectorRespVO();
        CollectorRespVO.setErrno(700);
        CollectorRespVO.setErrmsg("未登录");
        return CollectorRespVO;
    }
}
